﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:local="clr-namespace:EIA.SLClient.ProjectManage"
	xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:EIA_SLClient_Utility_Behaviors="clr-namespace:EIA.SLClient.Utility.Behaviors;assembly=EIA.SLClient.Utility"
	xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
	mc:Ignorable="d"
	x:Class="EIA.SLClient.ProjectManage.ChangePasswordView"
	d:DesignWidth="640" d:DesignHeight="480">
	<UserControl.Resources>
		<local:ChangePasswordViewModel x:Key="ChangePasswordViewModelDataSource" />
		<Style x:Key="button_clear_style" TargetType="Button">
			<Setter Property="Background" Value="#FF1F3B53"/>
			<Setter Property="Foreground" Value="#FF000000"/>
			<Setter Property="Padding" Value="3"/>
			<Setter Property="BorderThickness" Value="1"/>
			<Setter Property="BorderBrush">
				<Setter.Value>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="#FFA3AEB9" Offset="0"/>
						<GradientStop Color="#FF8399A9" Offset="0.375"/>
						<GradientStop Color="#FF718597" Offset="0.375"/>
						<GradientStop Color="#FF617584" Offset="1"/>
					</LinearGradientBrush>
				</Setter.Value>
			</Setter>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="MouseOver">
										<Storyboard>
											<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundAnimation"/>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Pressed">
										<Storyboard>
											<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundAnimation"/>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Disabled">
										<Storyboard>
											<DoubleAnimation Duration="0" To=".55" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisualElement"/>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
								<VisualStateGroup x:Name="FocusStates">
									<VisualState x:Name="Focused">
										<Storyboard>
											<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualElement"/>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Unfocused"/>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Border x:Name="Background" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3">
								<Grid Background="{TemplateBinding Background}">
									<Border x:Name="BackgroundAnimation" Opacity="0"/>
									<Rectangle x:Name="BackgroundGradient"/>
								</Grid>
							</Border>
							<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
							<Rectangle x:Name="DisabledVisualElement" Fill="#FFFFFFFF" IsHitTestVisible="false" Opacity="0" RadiusY="3" RadiusX="3"/>
							<Rectangle x:Name="FocusVisualElement" IsHitTestVisible="false" Opacity="0" RadiusY="2" RadiusX="2" StrokeThickness="1"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</UserControl.Resources>

	<Grid x:Name="LayoutRoot" DataContext="{Binding Source={StaticResource ChangePasswordViewModelDataSource}}">
		<Grid Background="#19FFFFFF" Visibility="{Binding IsShow, Converter={StaticResource Bool2VisibilityConverter}, Mode=TwoWay}">
			<Grid HorizontalAlignment="Center" Height="240" VerticalAlignment="Center" Width="360">
				<Grid.Effect>
					<DropShadowEffect BlurRadius="1" ShadowDepth="1" Opacity="0.1"/>
				</Grid.Effect>
				<Grid.RowDefinitions>
					<RowDefinition Height="30"/>
					<RowDefinition/>
				</Grid.RowDefinitions>
				<Grid>
					<Path Data="M1.9999981,0 L298,0 C299.10458,0 300,0.89542961 300,1.9999981 L300,28.000002 L300,30 L298,30 L1.9999981,30 L0,30 L0,28.000002 L0,1.9999981 C1.1175871E-07,0.89542961 0.89543062,0 1.9999981,0 z" Stretch="Fill" StrokeThickness="0" UseLayoutRounding="False">
						<Path.Fill>
							<ImageBrush Stretch="Fill" ImageSource="/EIA.SLClient.ProjectManage;component/assets/img/pop_header_bg.png"/>
						</Path.Fill>
					</Path>
					<StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
						<TextBlock TextWrapping="Wrap" Text="修改密码 " Foreground="White" VerticalAlignment="Center" FontSize="14.667" Margin="16,0,0,0" HorizontalAlignment="Left"/>
						<TextBlock TextWrapping="Wrap" Text="{Binding TitleTip}" Foreground="White" VerticalAlignment="Center" FontSize="14.667" HorizontalAlignment="Left"/>
					</StackPanel>
					<Button Content="" BorderThickness="0" Padding="0" Style="{StaticResource button_clear_style}" Command="{Binding CancelCommand}" FontSize="14.667" HorizontalAlignment="Right" Width="16" Height="16" Margin="0,0,8,0" VerticalAlignment="Center">
						<Button.Background>
							<ImageBrush Stretch="Fill" ImageSource="/EIA.SLClient.ProjectManage;component/assets/img/close-1.png"/>
						</Button.Background>
						<i:Interaction.Behaviors>
							<EIA_SLClient_Utility_Behaviors:Background4StateBehavior>
								<EIA_SLClient_Utility_Behaviors:Background4StateBehavior.BackgroundPressed>
									<ImageBrush Stretch="Fill" ImageSource="/EIA.SLClient.ProjectManage;component/assets/img/close-2.png"/>
								</EIA_SLClient_Utility_Behaviors:Background4StateBehavior.BackgroundPressed>
								<EIA_SLClient_Utility_Behaviors:Background4StateBehavior.BackgroundNormal>
									<ImageBrush Stretch="Fill" ImageSource="/EIA.SLClient.ProjectManage;component/assets/img/close-1.png"/>
								</EIA_SLClient_Utility_Behaviors:Background4StateBehavior.BackgroundNormal>
								<EIA_SLClient_Utility_Behaviors:Background4StateBehavior.BackgroundMouseOver>
									<ImageBrush Stretch="Fill" ImageSource="/EIA.SLClient.ProjectManage;component/assets/img/close-2.png"/>
								</EIA_SLClient_Utility_Behaviors:Background4StateBehavior.BackgroundMouseOver>
								<EIA_SLClient_Utility_Behaviors:Background4StateBehavior.BackgroundDisabled>
									<ImageBrush Stretch="Fill" ImageSource="/EIA.SLClient.ProjectManage;component/assets/img/close-1.png" Opacity="0.4"/>
								</EIA_SLClient_Utility_Behaviors:Background4StateBehavior.BackgroundDisabled>
							</EIA_SLClient_Utility_Behaviors:Background4StateBehavior>
						</i:Interaction.Behaviors>
					</Button>
				</Grid>
				<Border Grid.Row="1" BorderBrush="#FFE1E1E1" Background="White" BorderThickness="1,0,1,1">
					<Grid>
						<Grid Margin="8,8,8,52">
							<Grid.RowDefinitions>
								<RowDefinition Height="0.3*"/>
								<RowDefinition Height="0.3*"/>
								<RowDefinition Height="0.3*"/>
								<RowDefinition Height="0.3*"/>
							</Grid.RowDefinitions>
							<TextBox Margin="99,0,40,0" TextWrapping="Wrap" Text="{Binding LoginId, Mode=TwoWay}" d:LayoutOverrides="Height" VerticalAlignment="Center">
								<i:Interaction.Behaviors>
									<EIA_SLClient_Utility_Behaviors:UpdateTextBindingBehavior/>
								</i:Interaction.Behaviors>
							</TextBox>
							<PasswordBox x:Name="old" Margin="99,0,40,0" PasswordChanged="old_PasswordChanged" Grid.Row="1" d:LayoutOverrides="Height" VerticalAlignment="Center"/>
							<PasswordBox x:Name="new_0" Margin="99,0,40,0" Grid.Row="2" PasswordChanged="new_0_PasswordChanged" d:LayoutOverrides="Height" VerticalAlignment="Center"/>
							<PasswordBox x:Name="new_1" Margin="99,0,40,0" Grid.Row="3" PasswordChanged="new_1_PasswordChanged" d:LayoutOverrides="Height" VerticalAlignment="Center"/>
							<sdk:Label HorizontalAlignment="Left" Margin="31,0,0,0" Content="登陆名：" d:LayoutOverrides="Height" VerticalAlignment="Center"/>
							<sdk:Label HorizontalAlignment="Left" Margin="31,0,0,0" Content="新密码：" VerticalAlignment="Center" Grid.Row="2"/>
							<sdk:Label HorizontalAlignment="Left" Margin="31,0,0,0" Content="原密码：" d:LayoutOverrides="Height" Grid.Row="1" VerticalAlignment="Center"/>
							<sdk:Label HorizontalAlignment="Left" Margin="42,0,0,0" Content="确认：" VerticalAlignment="Center" Grid.Row="3"/>
						</Grid>
						<Button Content="关闭" BorderThickness="0" Padding="0" Style="{StaticResource button_clear_style}" Command="{Binding CancelCommand}" Height="30" VerticalAlignment="Bottom" Margin="0,0,8,8" FontSize="14.667" HorizontalAlignment="Right" Width="120">
							<Button.Background>
								<ImageBrush Stretch="Fill" ImageSource="/EIA.SLClient.ProjectManage;component/assets/img/btn1-1.png"/>
							</Button.Background>
							<i:Interaction.Behaviors>
								<EIA_SLClient_Utility_Behaviors:Background4StateBehavior>
									<EIA_SLClient_Utility_Behaviors:Background4StateBehavior.BackgroundPressed>
										<ImageBrush Stretch="Fill" ImageSource="/EIA.SLClient.ProjectManage;component/assets/img/btn1-2.png"/>
									</EIA_SLClient_Utility_Behaviors:Background4StateBehavior.BackgroundPressed>
									<EIA_SLClient_Utility_Behaviors:Background4StateBehavior.BackgroundNormal>
										<ImageBrush Stretch="Fill" ImageSource="/EIA.SLClient.ProjectManage;component/assets/img/btn1-1.png"/>
									</EIA_SLClient_Utility_Behaviors:Background4StateBehavior.BackgroundNormal>
									<EIA_SLClient_Utility_Behaviors:Background4StateBehavior.BackgroundMouseOver>
										<ImageBrush Stretch="Fill" ImageSource="/EIA.SLClient.ProjectManage;component/assets/img/btn1-2.png"/>
									</EIA_SLClient_Utility_Behaviors:Background4StateBehavior.BackgroundMouseOver>
									<EIA_SLClient_Utility_Behaviors:Background4StateBehavior.BackgroundDisabled>
										<ImageBrush Stretch="Fill" ImageSource="/EIA.SLClient.ProjectManage;component/assets/img/btn1-1.png" Opacity="0.4"/>
									</EIA_SLClient_Utility_Behaviors:Background4StateBehavior.BackgroundDisabled>
								</EIA_SLClient_Utility_Behaviors:Background4StateBehavior>
							</i:Interaction.Behaviors>
						</Button>
						<Button Content="保存" BorderThickness="0" Padding="0" Style="{StaticResource button_clear_style}" Command="{Binding SaveCommand}" Height="30" VerticalAlignment="Bottom" Margin="8,0,0,8" FontSize="14.667" HorizontalAlignment="Left" Width="120">
							<Button.Background>
								<ImageBrush ImageSource="/EIA.SLClient.ProjectManage;component/assets/img/btn2-1.png" Stretch="Fill"/>
							</Button.Background>
							<i:Interaction.Behaviors>
								<EIA_SLClient_Utility_Behaviors:Background4StateBehavior>
									<EIA_SLClient_Utility_Behaviors:Background4StateBehavior.BackgroundPressed>
										<ImageBrush Stretch="Fill" ImageSource="/EIA.SLClient.ProjectManage;component/assets/img/btn2-2.png"/>
									</EIA_SLClient_Utility_Behaviors:Background4StateBehavior.BackgroundPressed>
									<EIA_SLClient_Utility_Behaviors:Background4StateBehavior.BackgroundNormal>
										<ImageBrush Stretch="Fill" ImageSource="/EIA.SLClient.ProjectManage;component/assets/img/btn2-1.png"/>
									</EIA_SLClient_Utility_Behaviors:Background4StateBehavior.BackgroundNormal>
									<EIA_SLClient_Utility_Behaviors:Background4StateBehavior.BackgroundMouseOver>
										<ImageBrush Stretch="Fill" ImageSource="/EIA.SLClient.ProjectManage;component/assets/img/btn2-2.png"/>
									</EIA_SLClient_Utility_Behaviors:Background4StateBehavior.BackgroundMouseOver>
									<EIA_SLClient_Utility_Behaviors:Background4StateBehavior.BackgroundDisabled>
										<ImageBrush Stretch="Fill" ImageSource="/EIA.SLClient.ProjectManage;component/assets/img/btn2-1.png" Opacity="0.4"/>
									</EIA_SLClient_Utility_Behaviors:Background4StateBehavior.BackgroundDisabled>
								</EIA_SLClient_Utility_Behaviors:Background4StateBehavior>
							</i:Interaction.Behaviors>
						</Button>
					</Grid>
				</Border>
			</Grid>
		</Grid>
	</Grid>
</UserControl>
